package com.zll.test;

import java.util.Scanner;

public class 进制转换 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String line = in.nextLine();
            if(line!=null && line.startsWith("0x")){
                Integer num = Integer.parseInt(line.substring(2),16);
                System.out.println(num);
            }
        }
    }
}
